alter table jms_dm.dm_tab_departure_build_package_waybill_detail_dt
    set tblproperties ('external.table.purge' = 'true');
drop table jms_dm.dm_tab_departure_build_package_waybill_detail_dt;
CREATE EXTERNAL TABLE jms_dm.dm_tab_departure_build_package_waybill_detail_dt
(
    waybill_no        string comment '运单',
    package_code      string comment '包号',
    scan_site_code    string comment '建包中心code',
    scan_site         string comment '建包中心name',
    scan_time         string comment '建包扫描时间',
    site_agent_code   string comment '建包中心所属代理区code',
    site_agent_name   string comment '建包中心所属代理区name',
    pick_network_code string comment '寄件网点code',
    pick_network_name string comment '寄件网点name',
    pick_finance_code string comment '寄件财务中心code',
    date_time         string comment '扫描日期'
)
    COMMENT '出港建包监控日报明细'
    PARTITIONED BY (dt string COMMENT 't-1扫描时间')
    stored as parquet
    LOCATION '/dw/hive/jms_dm.db/external/dm_tab_departure_build_package_waybill_detail_dt'